package com.motionlog.activity;

import com.motionlog.R;
import com.motionlog.model.Base;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MoreModule extends Activity  implements OnClickListener {

	private static final String TAG = null;
	Button drawSth,my3player,WeiboImage,testShm;


	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.more_module);

		drawSth = (Button) findViewById(R.id.drawSomething);
		drawSth.setOnClickListener(this);
		
		my3player = (Button) findViewById(R.id.my3player);
		my3player.setOnClickListener(this);
	
		WeiboImage = (Button) findViewById(R.id.WeiboImage);
		WeiboImage.setOnClickListener(this);

		testShm = (Button) findViewById(R.id.testSth);
		testShm.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.drawSomething: 
			Intent i = new Intent(MoreModule.this, DrawSomething.class);
			i.putExtra("activity", MoreModule.class.getName());
			startActivityForResult(i, 0);
			break;
		case R.id.my3player: 
			Intent im = new Intent(MoreModule.this, Mp3Player.class);
			im.putExtra("activity", MoreModule.class.getName());
			startActivityForResult(im, 0);
			break;
		case R.id.WeiboImage: 
			Intent iw = new Intent(MoreModule.this, WeiboImage.class);
			iw.putExtra("activity", MoreModule.class.getName());
			startActivityForResult(iw, 0);
			break;	
		case R.id.testSth: 
			Intent it = new Intent(MoreModule.this, TestSomething.class);
			it.putExtra("activity", MoreModule.class.getName());
			startActivityForResult(it, 0);
			break;
		}
	}

	@Override
	protected void onResume() {
		super.onResume();

		android.util.Log.d(TAG, "motion.id: " + motion.id);
		if (motion.id != -1) {
	
			
		}
	}

	public static Base motion = new Base();

	@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		// Nested tabactivities doesn't work with startActivityForResult
		android.util.Log.d(TAG, "diagram resutl");
	}
}
